<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
	<meta content="yes" name="apple-mobile-web-app-capable" />
	<meta content="black" name="apple-mobile-web-app-status-bar-style">
	<meta content="telephone=no" name="format-detection" />
	<meta content="emai=no" name="format-detection" />
	<link rel="stylesheet" type="text/css" href="/css/common.css" />
	<link rel="stylesheet" type="text/css" href="/css/spread.css" />
	<script src="/js/zepto-1.1.6.js" type="text/javascript"></script>
	<script src="/js/spread.js" type="text/javascript"></script>
	<title>推广大使招募令</title>
	<style>
		body {
			min-height: 100%;
			text-align: center;
			position: relative;
		}

		.bg {
			position: absolute;
			top: 0;
			left: 0;
			height: 100%;
			z-index: -1;
			width: 100%;
		}

		.header {
			display: inherit;
			width: 100%;
		}

		.btn.btn-qrcode {
			margin-top: 3vh;
			width: 28%;
		}

		.btn.btn-friends {
			margin-top: 2vh;
			width: 29%;
		}

		table {
			color: #575757;
			font-size: 1.4rem;
			margin: 0 auto;
			width: 89%;
		}

			table tr {
				border-bottom: 1px solid #bfbfbf;
			}

			table td {
				padding: 5px 0;
			}

			table img {
				display: inherit;
				margin: 0 auto;
				width: 50%;
			}
	</style>
	<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script>
		var _hmt = _hmt || [];
		(function() {
			var hm = document.createElement("script");
			hm.src = "https://hm.baidu.com/hm.js?19f39b206aedf768b42fbc69e4e4f721";
			var s = document.getElementsByTagName("script")[0];
			s.parentNode.insertBefore(hm, s);
		})();
	</script>
</head>
<body>
	<img class="bg" src="../img/b_spread.jpg" />
	<div class="wrapper">
		<img class="header" src="../img/b_spread4.jpg" />
		<table>
			<colgroup>
				<col style="width:27%" />
				<col style="width:44%" />
				<col style="width:29%" />
			</colgroup>
			<tr>
				<td>10</td>
				<td>6元红包</td>
				<td><img src="../img/gift1.png" /></td>
			</tr>
			<tr>
				<td>30</td>
				<td>20元红包</td>
				<td><img src="../img/gift1.png" /></td>
			</tr>
			<tr>
				<td>50</td>
				<td>价值30元的母婴潮品</td>
				<td><img src="../img/gift2.png" /></td>
			</tr>
			<tr>
				<td>200</td>
				<td>价值80元的母婴潮品</td>
				<td><img src="../img/gift3.png" /></td>
			</tr>
			<tr>
				<td>500</td>
				<td>价值300元的母婴潮品</td>
				<td><img src="../img/gift4.png" /></td>
			</tr>
		</table>
		<a class="btn btn-qrcode" data-onhover="active" <?php if($attention){
			echo  'href="/spread/qrcode"';
		}else{
			echo 'onclick=zsmm.Popup.New($(".popup-qrcode"))';
		} ?>><img src="../img/btn_spread_qrcode1.png" /></a>
		<a class="btn btn-friends" data-onhover="active"  <?php if($distributor == 3){
			echo  'href="/spread/myspread"';
		}else{
			echo 'onclick="zsmm.Toast.New(\'先生成二维码参加活动\')"';
		} ?> ><img src="../img/btn_spread_friends.png" /></a>
	</div>
	<!-- 弹出且能关闭：zsmm.Popup.New($(".popup-qrcode"))弹出且不能关闭：zsmm.Popup.New($(".popup-qrcode"),0); -->
	<div class="hidden popup-qrcode">
		<img src="../img/qrcode_spread1.png" />
		<p>您还没有成为推广大使哦，送你去生成二维码，邀请小伙伴，走向人生巅峰！</p>
	</div>
	<script type="text/javascript">
		Zepto(function ($) {
			wx.config({
				debug: false,
				appId: '<?php echo $jsapi['js_config']['appId']?>',
				timestamp: <?php echo $jsapi['js_config']['timestamp']?>,
				nonceStr: '<?php echo $jsapi['js_config']['noncestr']?>',
				signature: '<?php echo $jsapi['js_config']['signature']?>',
				jsApiList: [
					'onMenuShareTimeline',
					'onMenuShareAppMessage'
				]
			});
			wx.ready(function () {
				wx.onMenuShareTimeline({
					title: '<?php echo $jsapi['share_title'];?>',
					link: '<?php echo $jsapi['share_url']?>', // 分享链接
					imgUrl: 'http://wx.zhishimama.com/img/salon_offline.png', // 分享图标
					success: function () {
						// 用户确认分享后执行的回调函数
					},
					cancel: function () {
						// 用户取消分享后执行的回调函数
					}
				});

				wx.onMenuShareAppMessage({
					title: '<?php echo $jsapi['share_title']?>',
					desc: '<?php echo $jsapi['share_content'];?>', // 分享描述
					link: '<?php echo $jsapi['share_url']?>', // 分享链接
					imgUrl: 'http://wx.zhishimama.com/img/salon_offline.png', // 分享图标
					type: 'link', // 分享类型,music、video或link，不填默认为link
					dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
					success: function () {
						// 用户确认分享后执行的回调函数
					},
					cancel: function () {
						// 用户取消分享后执行的回调函数
					}
				});
			});
		})
	</script>
</body>
</html>
